//48.0% images (3488650 bytes) (without filter, Z_BEST_SPEED)
//55.3% images (4665889 bytes) (without filter, fastlz level 2)
//55.6% images (4726334 bytes) (without filter, fastlz level 1)
+ //83.0% images (18091804 bytes) (no compression)
gfxcolor_t*image;
#ifdef FILTER_IMAGES
#ifdef HAVE_FASTLZ
compressdata_size = fastlz_compress_level(2, (void*)image, size*sizeof(gfxcolor_t), compressdata);
#else
- compress2(compressdata, &compressdata_size, (void*)image, sizeof(gfxcolor_t)*size, 6);
+ compress2(compressdata, &compressdata_size, (void*)image, sizeof(gfxcolor_t)*size, Z_BEST_SPEED);
#endif
writer_writeU32(w, compressdata_size);
int png_apply_filter_8(unsigned char*dest, unsigned char*src, int width, int y)
{
- png_apply_filter(dest, src, width, y, 8);
+ return png_apply_filter(dest, src, width, y, 8);
}
int png_apply_filter_32(unsigned char*dest, unsigned char*src, int width, int y)
{
- png_apply_filter(dest, src, width, y, 32);
+ return png_apply_filter(dest, src, width, y, 32);
}
EXPORT void savePNG(const char*filename, unsigned char*data, int width, int height, int numcolors)